<!-- Type Create -->
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main" />
  <title>Create ${title}</title>
</head>
<body>
  <div class="body">
    <h1>Create ${title}</h1>
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <g:hasErrors bean="${type}">
      <div class="errors">
        <g:renderErrors bean="${type}" as="list" />
      </div>
    </g:hasErrors>
    <g:form action="save" method="post" id="${title}" >
      <div class="dialog">
        <table>
          <tbody>
            <tr class="prop">
              <td valign="top" class="name">
                <label for="name">Name:</label>
              </td>
              <td valign="top" class="value ${hasErrors(bean:type,field:'name','errors')}">
                <input type="text" id="name" name="name" value="${fieldValue(bean:type,field:'name')}"/>
              </td>
            </tr>
            <tr class="prop">
              <td valign="top" class="name">
                <label for="description">Description:</label>
              </td>
              <td valign="top" class="value ${hasErrors(bean:type,field:'description','errors')}">
                <input type="text" id="description" name="description" value="${fieldValue(bean:type,field:'description')}"/>
              </td>
            </tr>
          </tbody>
        </table>
        <input type="hidden" id="type" name="type" value="${title}"/>
      </div>
      <div class="buttons">
        <span class="button"><input class="save" type="submit" value="Create" /></span>
      </div>
    </g:form>
  </div>
</body>
